import Vue from 'vue'
import App from './App.vue'
import VueRouter from "vue-router";
import home from "@/components/client/StoreHome/StoreHome";
import store from "@/components/client/StorePage/StorePage";
import search from "@/components/client/StoreSearch/StoreSearch";
import VueAxios from "vue-axios";
import Axios from "axios";
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';

Vue.use(VueAxios, Axios);
Vue.use(VueRouter);
Vue.use(ElementUI);
Vue.config.productionTip = false;

const routes = [
    {path: '/', redirect: '/home'},
    {path: '/home', component: home},
    {path: '/store', component: store},
    {path: '/search', component: search}
];
const router = new VueRouter({
    linkActiveClass: 'active',
    routes // (缩写) 相当于 routes: routes
});

new Vue({
    router,
    render: h => h(App),
}).$mount('#app');
